home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / QuickDraw™ GX v1.0ß2 / Sample Code / Printing Samples / Printer Drivers… / LaserWriterIISC / UniversalMessageIntf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-13  |  3.2 KB  |  87 lines  |  [TEXT/MPS ]

  1. /* ------------------------------------------------------------------------------
  2. FILENAME
  3.     UniversalMessageIntf.h
  4.  
  5. DESCRIPTION
  6.     This module contains the constant and type declarations for the 
  7.     UniversalMessageIntf.c file.  That file contains the routines which override
  8.     the universal imaging messages that are supported by the LaserWriterSC
  9.     driver.
  10.     
  11.     9/13/93 - dmh - Updated for the b2 seed.
  12.  
  13. COPYRIGHT
  14.      Copyright Apple Computer, Inc. 1989-1993
  15.      All rights reserved. 
  16.     
  17. -------------------------------------------------------------------------------- */
  18.  
  19. #ifndef __UNIVERSALMESSAGEINTF__
  20. #define __UNIVERSALMESSAGEINTF__
  21.  
  22. /*********************************************************************************
  23.  *                                            CONSTANTS                                                *
  24.  *********************************************************************************/
  25.  
  26. // Constants for knowing the max. limits of paper sizes 
  27. enum
  28. {
  29.     kMaxPageWidth            = ff(8 * 300),
  30.     kMaxLetterPageHeight    = ff(10 * 300 + 180),
  31.     kMaxLegalPageHeight    = ff(12 * 300),
  32.     kMaxPaperWidth         = ff(8 * 300 + 150),
  33.  
  34.     kMinSCTopMargin        = 0x0076,            // minimum top margin supported by printer
  35.     kMinSCLeftMargin        = 0x000E,            // minimum left margin for 8.5" width
  36.     
  37.     kUSLetterWidth            = ff(8 * 72 + 36),
  38.     kUSLetterHeight        = ff(11 * 72),
  39.     
  40.     kUSLegalWidth            = ff(8 * 72 + 36),
  41.     kUSLegalHeight            = ff(14 * 72),
  42.     
  43.     kA4LetterWidth            = ff(8 * 72 + 18),
  44.     kA4LetterHeight        = 0x034800A8,
  45.     
  46.     kB5LetterWidth            = 0x01F300E0,
  47.     kB5LetterHeight        = 0x02C3FF58,
  48.     
  49.     kEnvelopeWidth            = ff(4 * 72 + 9),
  50.     kEnvelopeHeight        = ff(9 * 72 + 36)
  51. };
  52.     
  53.  
  54. /*********************************************************************************
  55.  *                                             TYPES                                                     *
  56.  *********************************************************************************/
  57.  
  58. // SpecGlobalsRec - Structure containing the LaserWriterSC's global variables 
  59.  
  60. typedef struct
  61. {
  62.     gxRasterImageDataHdl    hImageData;                    // image data for a page 
  63.     gxFormat                pageFormat;                    // current page format we are printing 
  64.     short                    deviceNum;                    // SCSI device number of device we're connected to
  65.     short                    lastSCSIStatus;            //    last status returned from a call to SCSIComplete
  66.     long                    timeoutForSCSIComplete;    //    timeout in ticks to use in calls to SCSIComplete
  67.     short                    scsiCommand[3];            //    next SCSI command to execute
  68.     short                    drawbitsParams[5];        //    rectangle and transfer mode parameters used in the SC draw bits command
  69.     Boolean                    haveDrawBitsParams;        //    T => SD_CheckStatus routine has already received the DrawBits parameters;
  70.                                                                 //    This implies the data coming into SD_CheckStatus is the bitmap data
  71.     Boolean                    printedAPage;                //    T => driver has started printing a page;  F => driver hasn't yet printed a page 
  72.     gxFormat                lastPageFormat;            // gxFormat associated with the last page the driver printed
  73. }    SpecGlobalsRec,     
  74.     *SpecGlobalsPtr,      
  75.     **SpecGlobalsHdl;
  76.     
  77.     
  78. /*********************************************************************************
  79.  *                                            DEFINES                                                    *
  80.  *********************************************************************************/
  81.  
  82. #define kSpecGlobalsRecLen     sizeof(SpecGlobalsRec)
  83.  
  84. // F2S - for converting fixed numbers to shorts 
  85. #define F2S(a) FixedToInt(a)
  86.  
  87. #endif __UNIVERSALMESSAGEINTF__